Repository navigation
chore(codegen): type _impl_obj in the generated API - #3241
Merged
Pavel Feldman (pavelfeldman) merged 1 commit intoOct 12, 2026
Merged
Conversation
Dmitry Gozman (dgozman)
approved these changes
Oct 12, 2026
- Each generated class declares the type of its _impl_obj, so mypy checks every generated call against playwright/_impl: a member or option that the docs have and _impl/ lacks is now a mypy error. - Calls that return nothing are no longer wrapped in mapping.from_maybe_impl(), which mypy rejects once the type is known. - _wrap_handler returns Any and to_milliseconds gets overloads, to match the generated calls. - test_browser_type_repr uses the public browser.browser_type.
Pavel Feldman (pavelfeldman)
force-pushed
the
codegen-typed-impl
branch
from
October 12, 2026 21:51
300ebe1 to
4d302c1
Compare
Pavel Feldman (pavelfeldman)
merged commit Oct 12, 2026
222a2e0
into
microsoft:main
28 of 29 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_impl_obj, somypy playwrightchecks every generated call againstplaywright/_impl: a member or option that the docs have and_impl/lacks is a mypy error.mapping.from_maybe_impl()wrapper;_wrap_handlerandto_millisecondsget matching annotations;test_browser_type_repruses the publicbrowser.browser_type.